from ronglian_sms_sdk import SmsSDK
from celery_tasks.main import app

@app.task
def celery_send_sms_code(mobile,sms_code):
    accId = '8aaf070878d419aa01790300ac5212f1'
    accToken = '4641da65fd27454381f8ede2587d1075'
    appId = '8aaf070878d419aa01790300ad3f12f8'
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = '{}'.format(mobile)
    datas = (sms_code, 5)
    sdk.sendMessage(tid, mobile, datas)